package com.appfahrt.persistence.obj.dbo.generated;

import java.util.ArrayList;
import java.util.Date;

import com.appfahrt.persistence.obj.AbstractDatabaseObject;


/**
 * This Class is automatically generated.<br><br>
 *
 * <u><b>${schema}.fahrten</b></u><br><br>
 * 
 * <u><b>Table Definition:</b></u>
 * <table> 
 *   <tr> <th>Column-Name</th> <th>Data-Type</th> <th>Data-Length</th> <th>Nullable</th> <th>Description</th> </tr> 
 *   <tr> <td>ID </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fk_id_profil_fahrtenanbieter </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>freie_size </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>preis </td> <td>FLOAT</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fahrt_gestartet </td> <td>BOOLEAN</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fahrt_beendet </td> <td>BOOLEAN</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>aktuelle_logitude </td> <td>FLOAT</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>aktuelle_latitude </td> <td>FLOAT</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fk_id_adresse_start </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fk_id_adresse_ziel </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>fk_id_fahrzeug </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 * </table>
 * <br><br>
 * <u><b>References:</b></u> <br>
 *
 * <br><br>
 * <u><b>Indexes:</b></u> <br>
 *
 * <br><b>DON'T MODIFY THIS FILE</b><br><br>
 *
 * Generated: Sun May 22 22:20:18 CEST 2011
 */
public abstract class FahrtenGeneratedDbo extends AbstractDatabaseObject {
	
	public static final String TABLE = "fahrten";
	
	public static final String SCHEMA = "$schema";

	protected ArrayList<String> changedFieldList = new ArrayList<String>();
	
	private boolean loadFromDb = false;

	// Database Column-Definition
	public static final String ID = "id"; 
	public static final String fk_id_profil_fahrtenanbieter = "fk_id_profil_fahrtenanbieter"; 
	public static final String freie_size = "freie_size"; 
	public static final String preis = "preis"; 
	public static final String fahrt_gestartet = "fahrt_gestartet"; 
	public static final String fahrt_beendet = "fahrt_beendet"; 
	public static final String aktuelle_logitude = "aktuelle_logitude"; 
	public static final String aktuelle_latitude = "aktuelle_latitude"; 
	public static final String fk_id_adresse_start = "fk_id_adresse_start"; 
	public static final String fk_id_adresse_ziel = "fk_id_adresse_ziel"; 
	public static final String fk_id_fahrzeug = "fk_id_fahrzeug"; 
	public final static String[] COLUMNS = {  ID , fk_id_profil_fahrtenanbieter , freie_size , preis , fahrt_gestartet , fahrt_beendet , aktuelle_logitude , aktuelle_latitude , fk_id_adresse_start , fk_id_adresse_ziel , fk_id_fahrzeug  };

	// Members
			private Long Id = null;
				private Long FkIdProfilFahrtenanbieter = null;
				private Long FreieSize = null;
				private Float Preis = null;
				private Date FahrtGestartet = null;
				private Date FahrtBeendet = null;
				private Float AktuelleLogitude = null;
				private Float AktuelleLatitude = null;
				private Long FkIdAdresseStart = null;
				private Long FkIdAdresseZiel = null;
				private Long FkIdFahrzeug = null;
	
	/** Value-Holder for the references **/
	private References references = new References();
	
	/**
	 * Value-Holder for the references.
	 */
	public class References {


	}

	/**
	 * Constructor.
	 */
	public FahrtenGeneratedDbo() {
	
	}
	
	
	/**
	 * Returns the references.
	 */
	public References getReferences() {
		return this.references;
	}
	
	/**
	 * Setter for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setId(Long Id) {
				if (!(Id == null && this.Id == null) && !this.changedFieldList.contains("ID")) {
			this.changedFieldList.add("ID");
		}
		this.Id = Id ;
			}
	
	/**
	 * Getter for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getId () {
		return this.Id;
	}
	
	/**
	 * Equals-Method for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsId(Long Id) {
		boolean result = false;
				if (getId () != null
			&& getId ().equals( Id )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>fk_id_profil_fahrtenanbieter</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFkIdProfilFahrtenanbieter(Long FkIdProfilFahrtenanbieter) {
				if (!(FkIdProfilFahrtenanbieter == null && this.FkIdProfilFahrtenanbieter == null) && !this.changedFieldList.contains("fk_id_profil_fahrtenanbieter")) {
			this.changedFieldList.add("fk_id_profil_fahrtenanbieter");
		}
		this.FkIdProfilFahrtenanbieter = FkIdProfilFahrtenanbieter ;
			}
	
	/**
	 * Getter for <b>fk_id_profil_fahrtenanbieter</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getFkIdProfilFahrtenanbieter () {
		return this.FkIdProfilFahrtenanbieter;
	}
	
	/**
	 * Equals-Method for <b>fk_id_profil_fahrtenanbieter</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFkIdProfilFahrtenanbieter(Long FkIdProfilFahrtenanbieter) {
		boolean result = false;
				if (getFkIdProfilFahrtenanbieter () != null
			&& getFkIdProfilFahrtenanbieter ().equals( FkIdProfilFahrtenanbieter )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>freie_size</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFreieSize(Long FreieSize) {
				if (!(FreieSize == null && this.FreieSize == null) && !this.changedFieldList.contains("freie_size")) {
			this.changedFieldList.add("freie_size");
		}
		this.FreieSize = FreieSize ;
			}
	
	/**
	 * Getter for <b>freie_size</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getFreieSize () {
		return this.FreieSize;
	}
	
	/**
	 * Equals-Method for <b>freie_size</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFreieSize(Long FreieSize) {
		boolean result = false;
				if (getFreieSize () != null
			&& getFreieSize ().equals( FreieSize )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>preis</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setPreis(Float Preis) {
				if (!(Preis == null && this.Preis == null) && !this.changedFieldList.contains("preis")) {
			this.changedFieldList.add("preis");
		}
		this.Preis = Preis ;
			}
	
	/**
	 * Getter for <b>preis</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Float getPreis () {
		return this.Preis;
	}
	
	/**
	 * Equals-Method for <b>preis</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsPreis(Float Preis) {
		boolean result = false;
				if (getPreis () != null
			&& getPreis ().equals( Preis )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>fahrt_gestartet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFahrtGestartet(Date FahrtGestartet) {
		if (!(FahrtGestartet == null && this.FahrtGestartet == null)
				&& !this.changedFieldList.contains("fahrt_gestartet")) {
			this.changedFieldList.add("fahrt_gestartet");
		}
		this.FahrtGestartet = FahrtGestartet;
	}

	/**
	 * Getter for <b>fahrt_gestartet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Date getFahrtGestartet () {
		return this.FahrtGestartet;
	}
	
	/**
	 * Equals-Method for <b>fahrt_gestartet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFahrtGestartet(Date FahrtGestartet) {
		boolean result = false;
		if (getFahrtGestartet() != null
				&& getFahrtGestartet().equals(FahrtGestartet)) {
			result = true;
		}
		return result;
	}
	
	
	/**
	 * Setter for <b>fahrt_beendet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFahrtBeendet(Date FahrtBeendet) {
		if (!(FahrtBeendet == null && this.FahrtBeendet == null)
				&& !this.changedFieldList.contains("fahrt_beendet")) {
			this.changedFieldList.add("fahrt_beendet");
		}
		this.FahrtBeendet = FahrtBeendet ;
	}
	
	/**
	 * Getter for <b>fahrt_beendet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Date getFahrtBeendet () {
		return this.FahrtBeendet;
	}
	
	/**
	 * Equals-Method for <b>fahrt_beendet</b>  <br>
	 * Type: BOOLEAN <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFahrtBeendet(Date FahrtBeendet) {
		boolean result = false;
		if (getFahrtBeendet() != null
				&& getFahrtBeendet().equals(FahrtBeendet)) {
			result = true;
		}
		return result;
	}
	/**
	 * Setter for <b>aktuelle_logitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setAktuelleLogitude(Float AktuelleLogitude) {
				if (!(AktuelleLogitude == null && this.AktuelleLogitude == null) && !this.changedFieldList.contains("aktuelle_logitude")) {
			this.changedFieldList.add("aktuelle_logitude");
		}
		this.AktuelleLogitude = AktuelleLogitude ;
			}
	
	/**
	 * Getter for <b>aktuelle_logitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Float getAktuelleLogitude () {
		return this.AktuelleLogitude;
	}
	
	/**
	 * Equals-Method for <b>aktuelle_logitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsAktuelleLogitude(Float AktuelleLogitude) {
		boolean result = false;
				if (getAktuelleLogitude () != null
			&& getAktuelleLogitude ().equals( AktuelleLogitude )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>aktuelle_latitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setAktuelleLatitude(Float AktuelleLatitude) {
				if (!(AktuelleLatitude == null && this.AktuelleLatitude == null) && !this.changedFieldList.contains("aktuelle_latitude")) {
			this.changedFieldList.add("aktuelle_latitude");
		}
		this.AktuelleLatitude = AktuelleLatitude ;
			}
	
	/**
	 * Getter for <b>aktuelle_latitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Float getAktuelleLatitude () {
		return this.AktuelleLatitude;
	}
	
	/**
	 * Equals-Method for <b>aktuelle_latitude</b>  <br>
	 * Type: FLOAT <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsAktuelleLatitude(Float AktuelleLatitude) {
		boolean result = false;
				if (getAktuelleLatitude () != null
			&& getAktuelleLatitude ().equals( AktuelleLatitude )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>fk_id_adresse_start</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFkIdAdresseStart(Long FkIdAdresseStart) {
				if (!(FkIdAdresseStart == null && this.FkIdAdresseStart == null) && !this.changedFieldList.contains("fk_id_adresse_start")) {
			this.changedFieldList.add("fk_id_adresse_start");
		}
		this.FkIdAdresseStart = FkIdAdresseStart ;
			}
	
	/**
	 * Getter for <b>fk_id_adresse_start</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getFkIdAdresseStart () {
		return this.FkIdAdresseStart;
	}
	
	/**
	 * Equals-Method for <b>fk_id_adresse_start</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFkIdAdresseStart(Long FkIdAdresseStart) {
		boolean result = false;
				if (getFkIdAdresseStart () != null
			&& getFkIdAdresseStart ().equals( FkIdAdresseStart )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>fk_id_adresse_ziel</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFkIdAdresseZiel(Long FkIdAdresseZiel) {
				if (!(FkIdAdresseZiel == null && this.FkIdAdresseZiel == null) && !this.changedFieldList.contains("fk_id_adresse_ziel")) {
			this.changedFieldList.add("fk_id_adresse_ziel");
		}
		this.FkIdAdresseZiel = FkIdAdresseZiel ;
			}
	
	/**
	 * Getter for <b>fk_id_adresse_ziel</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getFkIdAdresseZiel () {
		return this.FkIdAdresseZiel;
	}
	
	/**
	 * Equals-Method for <b>fk_id_adresse_ziel</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFkIdAdresseZiel(Long FkIdAdresseZiel) {
		boolean result = false;
				if (getFkIdAdresseZiel () != null
			&& getFkIdAdresseZiel ().equals( FkIdAdresseZiel )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>fk_id_fahrzeug</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setFkIdFahrzeug(Long FkIdFahrzeug) {
				if (!(FkIdFahrzeug == null && this.FkIdFahrzeug == null) && !this.changedFieldList.contains("fk_id_fahrzeug")) {
			this.changedFieldList.add("fk_id_fahrzeug");
		}
		this.FkIdFahrzeug = FkIdFahrzeug ;
			}
	
	/**
	 * Getter for <b>fk_id_fahrzeug</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getFkIdFahrzeug () {
		return this.FkIdFahrzeug;
	}
	
	/**
	 * Equals-Method for <b>fk_id_fahrzeug</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsFkIdFahrzeug(Long FkIdFahrzeug) {
		boolean result = false;
				if (getFkIdFahrzeug () != null
			&& getFkIdFahrzeug ().equals( FkIdFahrzeug )) {
			result = true;
		}
				return result;
	} 

	/**
	 * Returns a short String with the values.
	 */
	public String toInfoShortString() {
		return  "[ID=" + this.Id+"]" +"-[fk_id_profil_fahrtenanbieter="+this.FkIdProfilFahrtenanbieter + "]" +"-[freie_size="+this.FreieSize + "]" +"-[preis="+this.Preis + "]" +"-[fahrt_gestartet="+this.FahrtGestartet + "]" +"-[fahrt_beendet="+this.FahrtBeendet + "]" +"-[aktuelle_logitude="+this.AktuelleLogitude + "]" +"-[aktuelle_latitude="+this.AktuelleLatitude + "]" +"-[fk_id_adresse_start="+this.FkIdAdresseStart + "]" +"-[fk_id_adresse_ziel="+this.FkIdAdresseZiel + "]" +"-[fk_id_fahrzeug="+this.FkIdFahrzeug + "]" ;
	}
	
	/**
	 * Returns a Comma-Separated Values (CSV) String. <br>
	 * Separator: ;
	 */
	public String toCsvString() {
		return toCsvString(";");
	}
	
	/**
	 * Returns a Comma-Separated Values (CSV) String
	 * with the given separator.
	 */
	public String toCsvString(String separator) {
		return  this.Id+separator+this.FkIdProfilFahrtenanbieter+separator+this.FreieSize+separator+this.Preis+separator+this.FahrtGestartet+separator+this.FahrtBeendet+separator+this.AktuelleLogitude+separator+this.AktuelleLatitude+separator+this.FkIdAdresseStart+separator+this.FkIdAdresseZiel+separator+this.FkIdFahrzeug;
	}
	
	/**
	 * Indicates whether the object has 
	 * changed or not.
	 */
	public boolean hasChanged() {
		return this.changedFieldList.size() > 0;
	}
	
	/**
	 * Changes Fields.
	 */
	public ArrayList<String> getChangedFieldList() {
		return this.changedFieldList;
	}
	
	/**
	 * Indicates, whether the object is new 
	 * or exists in the database.
	 */ 
	public boolean isNew() {
		return !loadFromDb;
	}
	
	/**
	 * Returns the name of the corresponding database table.
	 */
	public String getTable() {
		return TABLE;
	}
	
	/**
	 * Returns the name of the corresponding database schema.
	 */
	public String getSchema() {
		return SCHEMA;
	}
}